 /*
 * KIMWONSORK@GMAIL.COM
 * COPYRIGHT CRAYONSOFT All rights reserved.
 * 2013오후 7:39:16
 * kws
 */

package com.crayon.util;

import android.content.Context;
import android.util.Log;
import android.widget.Toast;

public class GDB {
	public static boolean debug=true;
	public static final String TAG="CRAYON-:";
	
	public static void info(Class cls,CharSequence xxx){
		if(debug)
		Log.i(cls.getSimpleName(), String.format("%s", xxx));
	}

	
	public static void log(Class cls,CharSequence xxx){
		if(debug)
			Log.i(TAG, String.format("%s\t%s",cls.getSimpleName(),xxx));
	}
	
	public static void log(Class cls,CharSequence xxx,Exception e){
		if(debug)
			Log.i(TAG, String.format("%s\t%s",cls.getSimpleName(),xxx),e);
	}

	public static void log(CharSequence xxx){
		if(debug)
			Log.i(TAG, String.format("%s",xxx));
	}
	
	public static void toast(Context context,CharSequence text){
		if(debug){
			Log.i(TAG, String.format("TRACE %s",text));
			Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
		}
	}
}